       <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
             <div class="row">
                    <div class="col-lg-12">
                        <h2 class="page-header">分类管理</h2>
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
                <div class="row">
                    <div class="col-lg-12">
                              <div class="panel panel-default">
                        <div class="panel-heading">
                            产品分类  <?php if(isset($parent)){?><a href="<?=site_url()?>categories/viewCategory/<?=$parent->parent_id?>"><i class="fa fa-caret-left"></i> <?=$parent->name_cn?></a> <?php }?> <a class="btn btn-default btn-sm pull-right" href="<?=site_url()?>categories/addCategory"><i class="fa fa-plus-circle"></i> 添加分类</a>
                       		<div class="clearfix"></div>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="dataTable_wrapper">
                                <table class="table table-striped table-bordered table-hover" id="catTable">
                                    <thead>
                                        <tr>
                                         <th>排序</th>
                                            <th>ID</th>
                                            <th>中文</th>
                                            <th>英文</th>
                                            <th>荷兰文</th>
                                           
                                            <th>显示状态</th>               
                                            <th>下级菜单</th>                                                                      
                                            <th>编辑设置</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    	<?php $cat_num = count($category)?>
                                    	<?php foreach ($category as $key=>$c):?>
                                        <tr class="odd gradeX">
                                          <td><button class="btn btn-xs btn-primary" type="button" onclick="changePosition('<?=$c->id?>','-1')" <?php if($c->position == 1){?>disabled<?php }?>><i class="fa fa-arrow-circle-up"></i></button> <?=$c->position?> <button class="btn btn-xs btn-primary" type="button" <?php if($c->position ==$cat_num){?>disabled<?php }?> onclick="changePosition('<?=$c->id?>','1')"><i class="fa fa-arrow-circle-down"></i></button></td>
                                            <td><?=$c->id?></td>
                                            <td><?=$c->name_cn?></td>
                                            <td><?=$c->name_en?></td>
                                            <td><?=$c->name_nl?></td> 
                                          
                                            <td><?php if(!$c->active){?><button type="button" class="btn btn-sm btn-danger" onclick="changeStatus('<?=$c->id?>','<?=$c->active?>')"><i class="fa fa-times"></i></button><?php }else{?><button type="button" class="btn btn-sm btn-success" onclick="changeStatus('<?=$c->id?>','<?=$c->active?>')"><i class="fa fa-check"></i></button><?php }?></td>
                                        	<td><?php if($c->children){?><a href="<?=site_url()?>categories/viewCategory/<?=$c->id?>" class="btn btn-primary btn-xs"><i class="fa fa-eye"></i> 查看</a><?php }?></td>
                                        	<td><a class="btn btn-primary btn-xs" href="<?=site_url()?>categories/editCategory/<?=$c->id?>"><i class="fa fa-pencil-square-o "></i> 编辑类别</a>  </td>
                                        </tr>
                                        <?php endforeach;?>
                                       
					

                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                           
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->              
                
            </div>
        </div>
         <script>
    $(document).ready(function() {
        $('#catTable').DataTable({
                resposive:true,
                "language": {
                	"sProcessing":   "处理中...",
                	"sLengthMenu":   "显示 _MENU_ 项结果",
                	"sZeroRecords":  "没有匹配结果",
                	"sInfo":         "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                	"sInfoEmpty":    "显示第 0 至 0 项结果，共 0 项",
                	"sInfoFiltered": "(由 _MAX_ 项结果过滤)",
                	"sInfoPostFix":  "",
                	"sSearch":       "搜索: ",
                	"sUrl":          "",
                	"sEmptyTable":     "表中数据为空",
                	"sLoadingRecords": "载入中...",
                	"sInfoThousands":  ",",
                	"oPaginate": {
                		"sFirst":    "首页",
                		"sPrevious": "上页",
                		"sNext":     "下页",
                		"sLast":     "末页"
                	},
                	"oAria": {
                		"sSortAscending":  ": 以升序排列此列",
                		"sSortDescending": ": 以降序排列此列"
                	}
                }
               
        });
    });
    </script>